package com.leyou.search.pojo;

import java.net.PortUnreachableException;
import java.util.Map;

public class SearchRequest {
    private String key;
    private Integer page;

    private Map<String,String> filter;

    public Map<String, String> getFilter() {
        return filter;
    }

    public void setFilter(Map<String, String> filter) {
        this.filter = filter;
    }

    //每页条数固定
    private static final int DEFAULT_ROWS=20;
    private static final int DEFAULT_PAGE=1;//默认页

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Integer getPage() {
        if (this.page==null){
            this.page=DEFAULT_PAGE;
        }
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }
    public int getSize(){
        return DEFAULT_ROWS;
    }

}
